<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/teacher/common/header.jsp"%>
<div class="clearfix"></div>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_title">
            <h2>添加学院 <i class="fa fa-user"></i></h2>
            <div class="clearfix"></div>
        </div>
        <form class="form-horizontal form-label-left" action="${pageContext.request.contextPath }/admin/addCollegeAndMajor" method="post">
            <div class="x_content1">
                <div class="item form-group">
                    <div style="color: red">${error}</div>
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学院名称 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="college" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学院专业<span class="required">*</span>
                    </label>
                    <div id="major" class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" id="major0" name="major" type="text" onblur="addInput()">
                    </div>
                </div>
                <div style="text-align: center">
                    <button type="submit" name="status" class="btn btn-success">添加</button>
                    <button type="button" class="btn btn-primary" onclick="javascript:window.history.back(-1);">返回</button>
                </div>
            </div>
        </form>
        <br/><br/><br/>
    </div>
<%@include file="/WEB-INF/jsp/teacher/common/footer.jsp"%>
    <script type="text/java" src="/statics/js/jquery.js"></script>
    <script type="text/java" src="/statics/js/jquery.min.js"></script>
    <script type="text/java" src="/statics/js/jquery-1.8.3.min.js"></script>
    <script>
        var id=0;
       function addInput(){
           if($("#major"+id).val()!=''){
               id++;
               $("#major").append("<input class='form-control col-md-7 col-xs-12' id='major"+id+"'name='major' type='text' onblur='addInput()'>");
           }
       }
    </script>